#ifndef FHE_CORE_ENCODER_REGISTERER_H
#define FHE_CORE_ENCODER_REGISTERER_H

#include <fhe/core/Encoder.h>

namespace fhe
{
  namespace core
  {
    template <typename T>
    class EncoderRegisterer : public boost::noncopyable
    {
    public:
      EncoderRegisterer()
      {
        FileSystem::instance().addEncoder( Encoder::Ptr( new T ) );
      }
    };
    
    #define FHE_ENCODER( name ) ::fhe::core::EncoderRegisterer<name> g_fhe_encoderregisterer_##name;
  }
}

#endif
